<template>
    <section class="server-register-outPutTable">
  
        				<el-table
							:data="backJieKouTableData"
							style="width: 100%;"
						>
						<el-table-column
						       	align="center"
						       	label="参数名"
						       	>
						      <template slot-scope="scope">
						      	<el-select v-model="scope.row.canshuName" @change ="getThisIndex" placeholder="请选择">
									    <el-option :label="item.chineseName"  :value="index" v-for="(item,index) in wenjianFormTable1Data" ></el-option>
								</el-select>
						      </template>
						</el-table-column>	
						
						
						<el-table-column
						       	align="center"
						       	label="对应元数据"
						       	style="width: 80px;"
						       	>
						      <template slot-scope="scope">
						      	<el-select v-model="scope.row.yuanData" placeholder="请选择" >
									    <el-option
									      v-for="item in wenjianFormYuanDataOptions"
									      :key="item.id"
									      :label="item.name"
									      :value="item.id">
									    </el-option>
								</el-select>
						      </template>
						</el-table-column>	
						
						<el-table-column
						       	align="center"
						       	label="校验规则"
						       	>
						      <template slot-scope="scope">
						      		<el-select v-model="scope.row.checkRule"  >
									    <el-option :label="item.name" :value="item.id" v-for = "(item,index) in checkRule"></el-option>
									</el-select>
						      </template>
						</el-table-column>	
										 		
						<el-table-column
						       	align="center"
						       	label="是否必填"
						       	>
						      <template slot-scope="scope">
						      		<el-switch  v-model="scope.row.isHas"></el-switch>
						      </template>
						       </el-table-column>
						       
						       <el-table-column
						       	align="center"
						       	label="是否校验"
						       	>
						      <template slot-scope="scope">
						      		<el-switch  v-model="scope.row.ischeck"></el-switch>
						      </template>
						       </el-table-column>
						       
						       <!--删除-->
						       <el-table-column
						       	align="center"
						       	label=""
						       	style="width: 80px;"
						       	width="50px"
						       	>
						      <template slot-scope="scope">
						      	<i class="el-icon-delete" @click="delFormData1(scope)"></i>
						      </template>
						       </el-table-column>				 		
						</el-table>
    </section>
</template>

<script>
    
    export default {
    	props:{
    		backJieKouTableData:Array,
    		backData:Array,
    		wenjianFormYuanDataOptions:Array,
    		wenjianFormTable1Data:Array,
    		outPutTabletimeOut:Boolean,
    		sqlTimeOut:Boolean
    	},
        data() {
          return {
          		checkRule:[
          			{
          				name:"等于",
          				id :1
          			},
          			{
          				name:"小于",
          				id :2
          			},
          			{
          				name:"大于",
          				id :3
          			},
          			{
          				name:"小于等于",
          				id :4
          			},
          			{
          				name:"大于等于",
          				id :5
          			},
          			{
          				name:"左模糊查询",
          				id :6
          			},
          			{
          				name:"右模糊查询",
          				id :7
          			},
          			{
          				name:"模糊查询",
          				id :8
          			},
          		],
          };
        },
        methods: {
        		getThisIndex(val){
        			console.log(val);
        		},
        		delFormData1(scope){
        				this.backJieKouTableData.splice(scope.$index,1);
        		}
        },
        watch:{
        	outPutTabletimeOut(newVal){
        		console.log(this.backJieKouTableData);
        		this.$emit('outPutTableData',this.backJieKouTableData);
        	},
        	sqlTimeOut(newVal){
        		this.$emit('outPutSql',this.backJieKouTableData);
        	}
        }
  };
</script>

<style scoped="scoped">
    .server-register-outPutTable{
    	
    }
</style>